프롬프팅의 다섯 기둥
단순한 채팅 인터페이스를 넘어선,대규모 언어 모델(Large Language Models, LLMs)구조화된 데이터 처리를 위한 정교한 엔진으로 작동합니다. 이 수업에서는 개발자가 인공지능을 전문적인 워크플로우에 통합할 수 있도록 도와주는 다섯 가지 기능적 '기초 원리'를 소개합니다.
기능적 루트맵
- 요약하기 :대량의 텍스트(예: 제품 리뷰)를 핵심 정보를 유지하면서 간결한 요약본으로 압축하는 작업입니다.
- 추론하기 :감성 탐지, 감정 식별, 또는 브랜드명과 같은 특정 데이터 포인트를 JSON 형식으로 추출하는 등 자동 분석을 수행하는 작업입니다.
- 변환하기 :텍스트를 한 형태에서 다른 형태로 변환하는 작업—이에는 언어 번역, 톤 조정(예: 공식 → 비공식), 데이터 형식 변환(예: JSON → HTML)이 포함됩니다.
- 확장하기 :짧은 신호나 목록 항목을 바탕으로 장문의 콘텐츠(예: 개인 맞춤형 고객 서비스 이메일)를 생성하는 작업입니다.
- 채팅봇 :대화 기록과 정의된 역할(시스템, 사용자, 보조자)을 활용하여 상호작용 가능하고 맥락 인식이 가능한 어시스턴트를 구축하는 작업입니다.
LLM의 무상태성에 대해
중요 개념:사람과 달리, LLM은 '무상태적'입니다. 각각의 API 호출 시 수동으로 전체 대화 기록을 다시 전달하지 않는 한, 과거 상호작용을 기억하지 않습니다. 이렇게 축적된 기록을 컨텍스트라고 합니다.
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
A developer needs to extract the "Price" and "Discount Code" from 1,000 emails and save them to a database. Which approach and temperature setting are most appropriate?
Challenge: Tone Transformer
Apply the Transforming and Chatbot role concepts.
You are building a "Tone Transformer" for a corporate helpdesk. You need to convert a frustrated user's slang-heavy complaint into a "Formal" and "Polite" summary for a manager.
Task
Specify the role of the "System" message to ensure the model acts appropriately, and write the "User" prompt to translate: 'The app is buggy as heck and I want my money back ASAP!'
System Message:
User Prompt:
Expected Result:
"You are a professional executive assistant. Your task is to rephrase communication into a formal, corporate-appropriate tone."User Prompt:
"Translate the following text into a formal summary: 'The app is buggy as heck and I want my money back ASAP!'"Expected Result:
"The customer is reporting technical instability within the application and is requesting an immediate refund."